package com.slz3.business.module.messageManagement.mesType.domain;

import com.slz3.business.frame.functions.Add;
import com.slz3.business.frame.functions.Modify;
import com.slz3.business.frame.module.DomainEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length;

import javax.persistence.Column;
import javax.persistence.MappedSuperclass;
import javax.validation.constraints.NotNull;

@MappedSuperclass
@Data
@EqualsAndHashCode(callSuper = false)
public class MesTypeEntity extends DomainEntity {

    /**
     * 编号
     */
    @Column(length = 80)
    @NotNull(message = "编号 必须非空!", groups = {Add.class, Modify.class})
    @Length(min = 1, max = 80, message = "编号 必须非空并且不超过 80 个字符!", groups = {Add.class, Modify.class})
    private String serNum;

    /**
     * 名称
     */
    @Column(length = 80)
    @NotNull(message = "编号 必须非空!", groups = {Add.class, Modify.class})
    @Length(min = 1, max = 80, message = "编号 必须非空并且不超过 80 个字符!", groups = {Add.class, Modify.class})
    private String serName;

}
